﻿@model IEnumerable<HdipCricketClub.Models.Fixture>

@{
    ViewBag.Title = "Select Fixture";
}

<h2>Team Selection.</h2>
<h2>Select the fixture you require:</h2>

<fieldset>
<legend>Fixture:</legend>
<p></p>
<p></p>
<table>
    
    <tr>
    <th>
            Date:
    </th>
    <th>
            Team:
    </th>
    <th>
            Opponent:
    </th>
    <th>    
            Type:
    </th>
    <th>
            Home:
    </th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
               @Html.DisplayFor(ModelItem => item.date)    
        </td>
        <td>
               @Html.DisplayFor(ModelItem => item.Team.name)
        </td>
        <td>  
               @Html.DisplayFor(ModelItem => item.Opponent.club_name) @Html.DisplayFor(ModelItem => item.Opponent.team_name)
        </td>
        <td>
               @Html.DisplayFor(ModelItem => item.type) 
        </td>
        <td>
                @Html.DisplayFor(ModelItem => item.home)
        </td>
        <td>
                @Html.DisplayFor(ModelItem => item.fixture_id)
        </td>
        <td>
                @Html.ActionLink("Select", "SelectPlayers", new { id = item.fixture_id })  
        </td>                
    </tr>
}       
</table>
</fieldset>

<p>
    @ViewBag.Message
</p>
<p>
    @Html.ActionLink("Return to Home Page", "Index", "Home")
</p>

